package 工厂模式.simple;

public class SimpFactory {

    public static Pay createPay(String type) {
        if (type.equals("ali")) {
            return new AliPay();
        } else if (type.equals("wx")) {
            return new WxPay();
        } else {
            return null;
        }
    }

}
